<section>
<h1>Callbacks</h1>

<p>Callbacks are a way to trigger a specific action when an event is fired
within jmpress.js. For instance if we want to fire some code before a slide
change we use the beforeChange callback:</p>
<pre><code>$('#jmpress').jmpress({
	'beforeChange': function( element, eventData ) {
		// ...
	}
});</code></pre>
<p>All callbacks supply the same two parameters: element, the element the event
	pertains to and eventData, various data associated with the event.</p>

<h2>Available Callbacks</h2>
<ul>
	<li>setActive: When a step is activated or selected.</li>
	<li>setInactive: When a previously active step is de-activated or not
	<li>afterInit: After all the steps are initialized.</li>
	<li>afterDeinit: After all the steps are de-initialized.</li>
	<li>beforeChange: Before each step change. eventData.cancel() cancels the select.</li>
	<li>beforeDeinit: Before all the steps are de-initialized.</li>
	<li>beforeInit: Before all the steps are initialized.</li>
	<li>beforeInitStep: On each step as it is initialized.</li>
	<li>initStep: On each step as it is initialized.</li>
	<li>applyStep: Called last on each step after it is initialized.</li>
	<li>unapplyStep: Called last on each step after is is de-initialized.</li>
	<li>loadStep: When a step has began loading via AJAX.</li>
	<li>afterStepLoaded: Called after the AJAX step has finished loading.</li>
	<li>selectEnd: Callback should return the last step.</li>
	<li>selectHome: Callback should return the first step.</li>
	<li>selectInitialStep: Callback should return the initial step.</li>
	<li>selectNext: Callback should return the next step.</li>
	<li>selectPrev: Callback should return the prev step.</li>
	selected.</li>
</ul>

<p>Additionally the jQuery events "enterStep" and "leaveStep" will be fired on the step element.</p>
</section>